package sim.misc;

import java.util.HashMap;
import java.util.HashSet;

import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class Holder

{
	public static SpriteBatch b = new SpriteBatch();
	public static HashMap<String, Texture> textures = new HashMap<String, Texture>();
	public static AssetManager assetManager = new AssetManager();

	/**
	 * Checks if the texture is contained within the textures ArrayList
	 * If so, returns that texture, otherwise returns the texture passed
	 * in.
	 * 
	 * @param texture - The texture to check.
	 * @return - A texture.
	 */
	public static Texture getTexture(Texture texture, String filePath)
	{
		
		if(textures.containsKey(filePath))
		{
			
			return textures.get(filePath);
		}
		else
		{
		textures.put(filePath, texture);
		return texture;
		}
	}
		
		
				
	
}



